package cn.bdqn.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.bdqn.entity.User;
import cn.bdqn.service.UserSerivce;

@Controller
@RequestMapping("/user")
public class UserController {
	@Autowired
	private UserSerivce userService;
	@RequestMapping("/getUser")
	public String getUser(Model model){
		User user=userService.findUser();
		model.addAttribute("user", user);
		return "user";
	}
}
